<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">
	<h:head>
		<h:title>Immunization Demo</h:title>
		<meta jr:name="dimagi-demo-immun"/>
		<model id="ImmDemo">
			<itext>
				<translation lang="English" default="">
					<text id="question5_1">
						<value form="long">Enter Weight</value>
						<value form="short">Weight</value>
					</text>
					<text id="question5_1hint">
						<value form="">Enter Weight</value>
					</text>
					<text id="question5_2">
						<value form="long">Units</value>
						<value form="short">Units</value>
					</text>
					<text id="question5_2hint">
						<value form="">Select Units</value>
					</text>
					<text id="queFiveLabel1">
						<value form="">Kilograms</value>
					</text>
					<text id="queFiveLabel2">
						<value form="">Pounds</value>
					</text>
					<text id="question6">
						<value form="long">Weight Chart</value>
						<value form="short">Weight Chart</value>
					</text>
					<text id="question6hint">
						<value form="">Weight Chart</value>
					</text>
					<text id="question7">
						<value form="long">TB Status</value>
						<value form="short">TB Status</value>
					</text>
					<text id="question7hint">
						<value form="">Select TB Status</value>
					</text>
					<text id="queSevenLabel1">
						<value form="">NO TB treatment or signs</value>
					</text>
					<text id="queSevenLabel2">
						<value form="">Waiting for TB results</value>
					</text>
					<text id="queSevenLabel3">
						<value form="">On INH Prophylaxis</value>
					</text>
					<text id="queSevenLabel4">
						<value form="">TB confirmed, will start treatment</value>
					</text>
					<text id="question8">
						<value form="long">Now I will ask you some questions to determine if you need to see a doctor on this visit.</value>
						<value form="short">Questions</value>
					</text>
					<text id="question8hint">
						<value form="">Answer Correctly</value>
					</text>
					<text id="health">
						<value form="long">How have you been since the last visit?</value>
						<value form="short">Health since last visit</value>
					</text>
					<text id="healthHint">
						<value form="">Select Correct answer</value>
					</text>
					<text id="queHealthLabel1">
						<value form="">Better or no different</value>
					</text>
					<text id="queHealthLabel2">
						<value form="">Not well</value>
					</text>
					<text id="question9">
						<value form="long">Have You been admitted to hospital since your last visit?</value>
						<value form="short">Admission Status</value>
					</text>
					<text id="question9hint">
						<value form="">Select Correct answer</value>
					</text>
					<text id="queNineLabel1">
						<value form="">NO</value>
					</text>
					<text id="queNineLabel2">
						<value form="">YES</value>
					</text>
					<text id="otherProblemsText">
						<value form="long">Have you had any serious medical problems that I didn't ask about since the last visit?</value>
						<value form="short">New Problems</value>
					</text>
					<text id="otherProblemsHint">
						<value form="">Select Correct answer</value>
					</text>
					<text id="otherProblemsLabel1">
						<value form="">No</value>
					</text>
					<text id="otherProblemsLabel2">
						<value form="">Yes</value>
					</text>
					
					<text id="needToDiscussText">
						<value form="long">Do you have other problems that I didn't ask about that you need to discuss with the doctor?</value>
						<value form="short">Other Problems</value>
					</text>
					<text id="needToDiscussHint">
						<value form="">Select Correct answer</value>
					</text>
					<text id="needToDiscussLabel1">
						<value form="">No</value>
					</text>
					<text id="needToDiscussLabel2">
						<value form="">Yes</value>
					</text>
				</translation>
			</itext>
			<instance>
				<data>
					<General>
						<Health />
						<HospitalizedAdmission />
					</General>
					<Weight>
						<History>
							<LatestValue><value/></LatestValue>
						</History>
						<Units />
					</Weight>
					<Vaccinations/>
					<Disease>
						<Status />
					</Disease>
					<Other>
						<OtherProblems/>
						<NeedToDiscuss/>
					</Other>
				</data>
			</instance>
			
			<bind id="history" nodeset="/data/Weight/History" type="jr:recordset" jr:preload="patient" jr:preloadParams="weight[:9:N]"/>
			
			<bind id="status" nodeset="/data/Disease/Status" type="xsd:string" />
			
			<bind id="message" nodeset="/data/Ask/Message" type="xsd:string" />
			
			<bind id="health" nodeset="/data/General/Health" type="xsd:string" />
			<bind id="admissionStatus" nodeset="/data/General/HospitalizedAdmission" type="xsd:string" />
			
			<bind id="weightValue" nodeset="/data/Weight/History/LatestValue/value" type="xsd:integer" />
			<bind id="units" nodeset="/data/Weight/Units" type="xsd:string" />
			
			<bind id="vaccinations" nodeset="/data/Vaccinations" jr:preload="patient" jr:preloadParams="vaccination_table" type="jr:vaccination_table"/>
			
			<bind id="otherProblems" nodeset="/data/Other/OtherProblems" type="xsd:string" />
			<bind id="needToDiscuss" nodeset="/data/Other/NeedToDiscuss" type="xsd:string" referralvalue="Yes" referraltext="Needs to discuss problems with Doctor"/>
			
		</model>
	</h:head>
	<h:body>
		<input bind="weightValue">
			<label ref="jr:itext('question5_1')"/>
			<hint ref="jr:itext('question5_1hint')"/>
		</input >
		<select1 bind="units" appearance="full">
			<label ref="jr:itext('question5_2')"/>
			<hint ref="jr:itext('question5_2hint')"/>
			<item>
				<label ref="jr:itext('queFiveLabel1')"/>
				<value>Kilograms</value>
			</item>
			<item>
				<label ref="jr:itext('queFiveLabel2')"/>
				<value>Pounds</value>
			</item>
		</select1 >
		
		<!--graph bind="history" type="WHOWeightGraph"-->
		<graph bind="history">
			<label ref="jr:itext('question6')"/>
			<hint ref="jr:itext('question6hint')"/>
		</graph>
		
		<table bind="vaccinations"><label>Immunization Table</label></table>
		
		<select bind="status" appearance="full">
			<label ref="jr:itext('question7')"/>
			<hint ref="jr:itext('question7hint')"/>
			<item>
				<label ref="jr:itext('queSevenLabel1')"/>
				<value>NO TB treatment or signs</value>
			</item>
			<item>
				<label ref="jr:itext('queSevenLabel2')"/>
				<value>Waiting for TB results</value>
			</item>
			<item>
				<label ref="jr:itext('queSevenLabel3')"/>
				<value>On INH Prophylaxis</value>
			</item>
			<item>
				<label ref="jr:itext('queSevenLabel4')"/>
				<value>TB confirmed, will start treatment</value>
			</item>
		</select >
		
		<trigger bind="message">
			<label ref="jr:itext('question8')"/>
			<hint ref="jr:itext('question8hint')"/>
		</trigger >
		
		<select1 bind="health" appearance="full">
			<label ref="jr:itext('health')"/>
			<hint ref="jr:itext('healthHint')"/>
			<item>
				<label ref="jr:itext('queHealthLabel1')"/>
				<value>NO</value>
			</item>
			<item>
				<label ref="jr:itext('queHealthLabel2')"/>
				<value>Yes</value>
			</item>
		</select1 >

		<select1 bind="admissionStatus" appearance="full">
			<label ref="jr:itext('question9')"/>
			<hint ref="jr:itext('question9hint')"/>
			<item>
				<label ref="jr:itext('queNineLabel1')"/>
				<value>NO</value>
			</item>
			<item>
				<label ref="jr:itext('queNineLabel2')"/>
				<value>Yes</value>
			</item>
		</select1 >
		
		<select1 bind="otherProblems" appearance="full" >
			<label ref ="jr:itext('otherProblemsText')" />
			<hint ref ="jr:itext('otherProblemsHint')" />
			<item>
				<label ref ="jr:itext('otherProblemsLabel1')" />
				<value>NO</value>
			</item>
			<item>
				<label ref ="jr:itext('otherProblemsLabel2')" />
				<value>Yes</value>
			</item>
		</select1 >
					
		<select1 bind="needToDiscuss" appearance="full" >
			<label ref ="jr:itext('needToDiscussText')" />
			<hint ref ="jr:itext('needToDiscussHint')" />
			<item>
				<label ref ="jr:itext('needToDiscussLabel1')" />
				<value>NO</value>
			</item>
			<item>
				<label ref ="jr:itext('needToDiscussLabel2')" />
				<value>Yes</value>
			</item>
		</select1 >			
	</h:body>
</h:html>
